import { createRouter, createWebHistory } from "vue-router";

const routes = [
    {
        path: "/navigationBar",
        name: "navigationBar",
        component: () =>
            import(
                "@/components/compoents-nav/navigationBar.vue"
            ),
    },

    {
        path: "/subject/english/reading-others",
        name: "reading-others",
        component: () =>
            import("@/views/subjects/english/pages/reading-study/reading-others.vue"),
    },
    {
        path: "/subject/english/reading-science",
        name: "reading-science",
        component: () =>
            import(
                "@/views/subjects/english/pages/reading-study/reading-science.vue"
            ),
    },
    {
        path: "/subject/english/reading-technology",
        name: "reading-technology",
        component: () =>
            import(
                "@/views/subjects/english/pages/reading-study/reading-technology.vue"
            ),
    },
    {
        path: "/subject/english/reading-culture",
        name: "reading-culture",
        component: () =>
            import(
                "@/views/subjects/english/pages/reading-study/reading-culture.vue"
            ),
    },
    {
        path: "/subject/english/reading-economy",
        name: "reading-economy",
        component: () =>
            import(
                "@/views/subjects/english/pages/reading-study/reading-economy.vue"
            ),
    },
    {
        path: "/subject/english/reading-history",
        name: "reading-history",
        component: () =>
            import(
                "@/views/subjects/english/pages/reading-study/reading-history.vue"
            ),
    },
    {
        path: "/subject/english/reading-society",
        name: "reading-society",
        component: () =>
            import(
                "@/views/subjects/english/pages/reading-study/reading-society.vue"
            ),
    },
    {
        path: "/subject/english/plan-study",
        name: "plan-study",
        component: () =>
            import("@/views/subjects/english/pages/plan-study/plan-study.vue"),
    },
    {
        path: "/subject/english/reading-stydy",
        name: "reading-stydy",
        component: () =>
            import("@/views/subjects/english/pages/reading-study/reading-study.vue"),
    },
    {
        path: "/subject/english/reading-home",
        name: "reading-home",
        component: () =>
            import("@/views/subjects/english/pages/reading-study/reading-home.vue"),
        chlidren: [],
    },
    // {
    //     path: "/subject/english",
    //     name: "english-home-page",
    //     component: () =>
    //         import("@/views/subjects/english/pages/home/home.vue"),
    // },
    // {
    //     path: "/auth",
    //     name: "auth",
    //     component: () =>
    //         import("@/views/auth/auth.vue"),
    // },
    {
        path: "/ai/home",
        name: "ai-home",
        component: () =>
            import("@/views/ai-learn-system-homepage/ai-learn-system-homepage.vue"),
    },
    {
        path: "/english/vo",
        name: "english-vo",
        component: () =>
            import(
                "@/views/subjects/english/pages/vocabulary-study/vocabulary-study.vue"
            ),
    },
    {
        path: "/english/us",
        name: "english-us",
        component: () =>
            import(
                "@/views/subjects/english/pages/vocabulary-study/user-spell.vue"
            ),
    },
    {
        path: "/english/ust",
        name: "english-ust",
        component: () =>
            import(
                "@/views/subjects/english/pages/vocabulary-study/user-self-testing.vue"
            ),
    },
    {
        path: "/english/ma",
        name: "english-ma",
        component: () =>
            import(
                "@/views/subjects/english/pages/vocabulary-study/matching-exercise.vue"
            ),
    },
    {
        path: "/sd",
        name: "system-description",
        component: () =>
            import(
                "@/views/subjects/english/pages/system-description/system-description.vue"
            ),
    },
    {
        path: "/voc",
        name: "vocabulary-creation",
        component: () =>
            import(
                "@/views/subjects/english/pages/vocabulary-study/vocabulary-creation.vue"
            ),
    },
    {
        path: "/english/recite-words-home",
        name: "english-recite-words-home",
        component: () =>
            import(
                "@/views/subjects/english/pages/home/recite-words-home/recite-words-home.vue"
            ),
    },
    // {
    //     path: "/english/nav",
    //     name: "english-nav",
    //     component: () =>
    //         import(
    //             "@/views/subjects/english/components/english-nav/english-nav.vue"
    //         ),
    // },
];

import { authRoutes } from "./auth";
import { englishRoutes } from "./subjects/english";

const totalRoutes = [
    {
        path: "/",
        name: "home",
        component: () =>
            import(
                "@/components/compoents-nav/navigationBar.vue"
            ),
        redirect: '/subject/english',
        children: [
            ...routes,
			...authRoutes,
			...englishRoutes
        ]
    },
];

const router = createRouter({
    history: createWebHistory("/"),
    routes: totalRoutes,
});

export default router;